-- SCHEMA: stock_market
-- DROP SCHEMA IF EXISTS stock_market ;

CREATE SCHEMA IF NOT EXISTS stock_market
    AUTHORIZATION postgres;

COMMENT ON SCHEMA stock_market
    IS '沪深京股票';



-- Table: stock_market.stock
-- DROP TABLE IF EXISTS stock_market.stock;

CREATE TABLE IF NOT EXISTS stock_market.stock
(
    code character varying(32) COLLATE pg_catalog."default" NOT NULL,
    sname character varying(128) COLLATE pg_catalog."default" NOT NULL,
    exchange character varying(32) COLLATE pg_catalog."default",
    field character varying(128) COLLATE pg_catalog."default",
    sector character varying(128) COLLATE pg_catalog."default",
    concept character varying(128) COLLATE pg_catalog."default",
    CONSTRAINT stock_pkey1 PRIMARY KEY (code)
)

TABLESPACE pg_default;
ALTER TABLE IF EXISTS stock_market.stock
    OWNER to postgres;

COMMENT ON TABLE stock_market.stock
    IS '沪深京股票简洁信息';

COMMENT ON COLUMN stock_market.stock.field
    IS '领域';

COMMENT ON COLUMN stock_market.stock.sector
    IS '板块';

COMMENT ON COLUMN stock_market.stock.concept
    IS '概念';


-- SCHEMA: stock_datas
-- DROP SCHEMA IF EXISTS stock_datas ;
CREATE SCHEMA IF NOT EXISTS stock_datas
    AUTHORIZATION postgres;

COMMENT ON SCHEMA stock_datas
    IS '股票历史数据';